cmake_minimum_required(VERSION 3.12)
project(vlog_deploy)
# Set C++ standard
set(CMAKE_CXX_STANDARD 17)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)

# todo:编译优化选项，开启后运行速度加快（-03）
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")

find_package(Threads REQUIRED)
find_package(CURL REQUIRED)
aux_source_directory(./src SRC_FILES)
include_directories(./include)
# Include directories
include_directories(${CMAKE_SOURCE_DIR}/third_party)
# Link directories
link_directories(${CMAKE_SOURCE_DIR}/third_party)
include_directories(/usr/local/include)

# 创建可执行文件
#add_executable(image_handler image_handler.cpp)
# 链接必要的系统库
# 在 Linux 上使用 dl 库来支持动态加载功能
#target_link_libraries(image_handler dl)

# 创建可执行文件
add_executable(video_handler ${SRC_FILES})
# 链接必要的系统库
# 在 Linux 上使用 dl 库来支持动态加载功能
target_link_libraries(video_handler dl alibabacloud-oss-cpp-sdk crypto ${CURL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})

